var solrFiledCopyWinEdit;
var solrFiledCopyFormEdit;
function updateSolrFiledCopy(){
	var record = grid.getSelectionModel().selected;
	if(record.length == 0){
		msgTishi('请选择要修改的一项！');
		return;
	}
	initSolrFiledCopyFormEdit();
	solrFiledCopyWinEdit = Ext.create('Ext.Window',{
		layout:'fit',
		width:800,
		height:400,
		maximizable:true,
		minimizable:true,
		animateTarget:document.body,
		plain:true,
		modal:true,
		title:'编辑信息',
		listeners:{
			minimize:function(win,opts){
				if(!win.collapse()){
					win.collapse();
				}else{
					win.expand();
				}
			}
		},
		items:solrFiledCopyFormEdit,
		buttons:[{
			text:'保存',
			itemId:'save',
			handler:function(button){
				submitForm(solrFiledCopyFormEdit,'../solrFiledCopyController/updateSolrFiledCopy',grid,solrFiledCopyWinEdit,false,true);
			}
		},{
			text:'关闭',
			itemId:'close',
			handler:function(button){
				button.up('window').close();
			}
		}]
	});
	solrFiledCopyWinEdit.show();
	
	loadFormData(solrFiledCopyFormEdit,'../solrFiledCopyController/getSolrFiledCopyById?solr_filed_copy_id='+ record.items[0].data.solr_filed_copy_id);
}
function initSolrFiledCopyFormEdit(){
	solrFiledCopyFormEdit = Ext.create('Ext.FormPanel',{
		xtype:'form',
		waitMsgTarget:true,
		defaultType:'textfield',
		fieldDefaults:{
			labelWidth:100,
			labelAlign:'right',
			flex:1,
			margin:'2 5 4 5'
		},
		items:[
		{
			fieldLabel:'主键编号',
			xtype:'textfield',
			hidden:true,
			name:'solr_filed_copy_id',
			allowBlank:false,
			maxLength:32,
			anchor:'100%'
		},
		{
			fieldLabel:'索引字段源',
			xtype:'textfield',
			name:'solr_filed_copy_source_id',
			xtype:'combo',
			emptyText:'请选择',
			store:solrsourceIndexList,
			mode:'local',
			triggerAction:'all',
			editable:false,
			hiddenName:'solr_filed_copy_source_id',
			valueField:'solr_index_id',
			displayField:'solr_index_name',
			anchor:'100%'
		},
		{
			fieldLabel:'目标字段索引',
			xtype:'textfield',
			name:'solr_filed_copy_dest_id',
			xtype:'combo',
			emptyText:'请选择',
			store:solrdestIndexList,
			mode:'local',
			triggerAction:'all',
			editable:false,
			hiddenName:'solr_filed_copy_dest_id',
			valueField:'solr_index_id',
			displayField:'solr_index_name',
			anchor:'100%'
		},
		{
			fieldLabel:'备注',
			xtype:'textfield',
			name:'solr_filed_copy_remark',
			maxLength:200,
			anchor:'100%'
		},
		{
			fieldLabel:'创建时间',
			xtype:'datefield',
			format:'Y-m-d',
			name:'solr_filed_copy_ctime',
			maxLength:10,
			anchor:'40%'
		},
		{
			fieldLabel:'修改时间',
			xtype:'datefield',
			format:'Y-m-d',
			name:'solr_filed_copy_mtime',
			maxLength:10,
			anchor:'40%'
		},
		{
			fieldLabel:'创&nbsp;&nbsp;建&nbsp;&nbsp;人',
			xtype:'textfield',
			name:'xt_userinfo_realName',
			maxLength:32,
			anchor:'100%'
		},
		{
			fieldLabel:'实例编号',
			xtype:'textfield',
			id:'solr_core_id_',
			hidden:true,
			name:'solr_core_id',
			maxLength:32,
			hidden:true,
			anchor:'100%'
		}
		]
	});
}
